﻿<%@ Page Language="C#" MasterPageFile="~/MasterPages/BaseMaster.master" AutoEventWireup="true" CodeFile="admin.aspx.cs" Inherits="restaurant_admin" Title="Untitled Page" %>
<asp:Content ID="Content1" ContentPlaceHolderID="Base_ContentPlaceHolder" Runat="Server">
<form runat="server">
<br />
<br />
<br />
<div id="register_user">
     <table width="38%" border="1">
        <tr>
            <td style="text-align:right"><asp:Label ID="username_lable" runat="server" Text="用户名"></asp:Label></td>
            <td style="width:75%;text-align:left">
                <asp:TextBox ID="username_textbox" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="username_required_validator" ControlToValidate="username_textbox"
                runat="server" ValidationGroup="register_group" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align:right"><asp:Label ID="pwd_lable" runat="server" Text="密码" Visible="false"></asp:Label></td>
            <td style="width:75%;text-align:left">
                <asp:TextBox ID="pwd_textbox" runat="server" TextMode="Password" Visible="false"></asp:TextBox>
                <asp:RequiredFieldValidator ID="pwd_required_validator" ControlToValidate="pwd_textbox" Visible="false"
                runat="server" ValidationGroup="register_group" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align:right"><asp:Label ID="repwd_lable" runat="server" Text="确认密码" Visible="false"></asp:Label></td>
            <td style="width:75%;text-align:left">
                <asp:TextBox ID="repwd_textbox" runat="server" TextMode="Password" Visible="false"></asp:TextBox>
                <asp:RequiredFieldValidator ID="repwd_required_validator" ControlToValidate="repwd_textbox" Visible="false"
                runat="server" ValidationGroup="register_group" ErrorMessage="*"></asp:RequiredFieldValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align:right"><asp:Label ID="mobile_lable" runat="server" Text="联系电话"></asp:Label></td>
            <td style="width:75%;text-align:left">
                <asp:TextBox ID="mobile_textbox" runat="server"></asp:TextBox>
                <asp:RequiredFieldValidator ID="mobile_required_validator" ControlToValidate="mobile_textbox"
                runat="server" ValidationGroup="register_group" ErrorMessage="*"></asp:RequiredFieldValidator>
                <asp:RegularExpressionValidator ID="mobile_regex_validator" ControlToValidate="mobile_textbox"
                runat="server" ValidationGroup="register_group" ErrorMessage="*" ValidationExpression="(\d{7,11})">
                </asp:RegularExpressionValidator>
            </td>
        </tr>
        <tr>
            <td style="text-align:right"><asp:Label ID="identity_card_lable" runat="server" Text="身份证号"></asp:Label></td>
            <td style="width:75%;text-align:left">
                <asp:TextBox ID="idcard_textbox" runat="server"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td><asp:Button ID="edit_button" runat="server" OnClick="OnEditBtnClick" Text="编辑"/></td>
            <td><asp:Button ID="submit_button" runat="server" OnClick="OnSubmitBtnClick" Text="保存"/></td>
        </tr>
        <tr>
            <td colspan="2" style="text-align:left"><asp:Label ID="notice_lable" runat="server"></asp:Label></td>
        </tr>
    </table>
</div>
<br />
<br />
<br />
<div>
<div id="restaurant_list_menu" style="vertical-align:top;height:40px;text-align:center;float:left;overflow:auto;width:75%;
 font-size:x-large">
<table style="border:1px" width="100%">
<tr>
<td><asp:Label ID="restaurant_list_label" runat="server" Text ="我的餐厅列表" /></td>
<td><asp:Button ID="addrestaurant_button" runat="server" Text="添加餐厅" OnClick="OnNewRestaurant"/></td>
</tr>
</table>
</div>
<div id="restaurant_list" style="vertical-align:top;height:100%;text-align:left;float:left;overflow:auto; width:100%">

<asp:DataGrid id="restaurant_list_datagrid" runat="server" SelectedItemStyle-BackColor="#99ccff"
PagerStyle-Visible="False" PageSize="10" ItemStyle-CssClass="tableItem" HeaderStyle-CssClass="tableHeader"
 HeaderStyle-BackColor="#aaaadd" BorderColor="black" BackColor="AntiqueWhite" Font-Size="medium"
AutoGenerateColumns="False" DataKeyField="Id" ShowHeader="True" OnItemCommand="OnClickResButton" Width="98%">

<Columns>
<asp:templatecolumn headertext="序号" >
<itemtemplate>
<%# Container.ItemIndex+1 %>
</itemtemplate>
    <ItemStyle Width="35px" />
</asp:templatecolumn>           
<asp:boundcolumn
DataField="Name" HeaderText="餐厅名" >
    <ItemStyle Width="150px" />
</asp:boundcolumn>
<asp:boundcolumn
DataField="AddressDescription" HeaderText="地址" >
    <ItemStyle Width="350px" />
</asp:boundcolumn>
<asp:boundcolumn
DataField="Open" HeaderText="状态" >
    <ItemStyle Width="35px" />
</asp:boundcolumn>
<asp:boundcolumn
DataField="Deadline" HeaderText="有效期" >
    <ItemStyle Width="180px" />
</asp:boundcolumn>
<asp:TemplateColumn>
<ItemTemplate>
<asp:Button ID="enter_btn" runat="server"
 Text="进入餐厅" CommandName="enter_btn">
</asp:Button>
<asp:Button ID="del_btn" runat="server"
 Text="删除餐厅" CommandName="del_btn">
</asp:Button>
</ItemTemplate>
</asp:TemplateColumn>
</Columns>
    <SelectedItemStyle BackColor="#99CCFF" />
    <PagerStyle Visible="False" />
    <ItemStyle CssClass="tableItem" />
    <HeaderStyle BackColor="#AAAADD" CssClass="tableHeader" />
</asp:DataGrid>
</div>
</div>
</form>
</asp:Content>